home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / print / masdir54.arj / SDLSETUP.BAT < prev    next >
DOS Batch File  |  1992-11-23  |  9KB  |  211 lines

  1. ECHO OFF
  2. : SDLSETUP.BAT for PC/MS DOS Version 3.0 or later
  3. IF NOT EXIST sdl_get.EXE GOTO FILES
  4. set GET=
  5. sdl_get E
  6. IF ERRORLEVEL 120 GOTO ENVOK
  7. IF "%1"=="SECOND" GOTO ENVIRON
  8. IF "%2"=="SECOND" GOTO ENVIRON
  9. ECHO * * *
  10. ECHO SDLSETUP has determined that it will be necessary to shell to
  11. ECHO a second copy of the command processor in order to increase
  12. ECHO the amount of DOS Environment space available.  This will be
  13. ECHO completely automatic; however, it would be a good idea to
  14. ECHO later read the information in the documentation about increasing
  15. ECHO your Environment space so that SDL and other programs will have
  16. ECHO sufficient Environment to successfully execute.  If you are 
  17. ECHO running SDLSETUP from a SHELL, please read SHELLS.DOC.
  18. ECHO * * *
  19. ECHO You may see messages about "Out of Environment Space" or 
  20. ECHO duplicate informational messages from SDLSETUP because of the
  21. ECHO secondary command processor.  These will be taken care of 
  22. ECHO automatically and are nothing to be concerned about.
  23. ECHO * * *
  24. PAUSE
  25. %COMSPEC% /E:3072 /C%0 %1 SECOND
  26. goto EXIT
  27. :ENVOK
  28. sdl_get B
  29. IF EXIST SDLSETUP.TXT ERASE SDLSETUP.TXT
  30. set GET=SDLSETUP
  31. if NOT "%GET%"=="SDLSETUP" goto ENVIRON
  32. if "%1"=="SDLCONFG" SET GET=SDLCONFG
  33. ECHO %GET%.BAT copyright (c) 1987-1992 Bob Stephan. All rights reserved.
  34. ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  35. Echo * * *  This version of %GET% is for PC or MS DOS   * * *
  36. Echo * * * If you are using DR DOS, please read DRDOS.DOC  * * *
  37. ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  38. ECHO * * This is a BATCH program so it may be a little slow, but   * *
  39. ECHO * * you don't have to run it very often so please be patient. * *
  40. ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
  41. sdl_get YE
  42. if errorlevel 2 goto drive_ok
  43. Echo It will run faster if you run it from a hard disk or a RAM disk (VDISK).
  44. Echo For best results COPY %GET%:SDL*.* to a RAM drive or to a subdirectory on
  45. Echo your hard disk. You may exit to do this now if you wish.  
  46. Echo If you use the floppy disk, it must NOT be write protected.
  47. ECHO * * *
  48. sdl_get N "Are you ready to continue (Y,n)? "
  49. IF ERRORLEVEL 126 GOTO QUIT
  50. IF NOT ERRORLEVEL 89 GOTO QUIT
  51. :drive_ok
  52. IF NOT EXIST SDL.COM GOTO FILES
  53. SDL /!
  54. SET $=54 55
  55. IF ERRORLEVEL 54 IF NOT ERRORLEVEL 55 GOTO READY
  56. IF ERRORLEVEL 155 GOTO VERSION
  57. IF NOT ERRORLEVEL 154 GOTO VERSION
  58. SET $=154 155
  59. :READY
  60. ECHO This program will modify the file SDL.COM on this disk.
  61. ECHO None of your original files will be modified in any way.
  62. ECHO Your CONFIG.SYS and AUTOEXEC.BAT will NOT be changed.
  63. ECHO * * *
  64. ECHO Checking system resources. Please wait.
  65. SDL_GET LE "MASDIR 5.4"
  66. IF NOT ERRORLEVEL 1 GOTO CKDEBUG
  67. ECHO If this is the original %GET% disk you should establish a working
  68. ECHO disk and/or directory to preserve the original (see SDLSETUP.DOC).
  69. ECHO * * *
  70. sdl_get N "Are you ready to continue (Y,n)? "
  71. IF ERRORLEVEL 126 GOTO QUIT
  72. IF NOT ERRORLEVEL 89 GOTO QUIT
  73. :CKDEBUG Test for running DEBUG
  74. IF EXIST DEBUG.COM GOTO CKFILES
  75. IF EXIST DEBUG.TST ERASE DEBUG.TST
  76. ECHO R >debug.txt
  77. ECHO Q >>debug.txt
  78. DEBUG <debug.txt >debug.tst
  79. IF NOT EXIST DEBUG.TST GOTO NODEBUG
  80. SDL_GET F DEBUG.TST
  81. IF %GET% == 0 GOTO NODEBUG
  82. IF EXIST DEBUG.T?T ERASE DEBUG.T?T >NUL
  83. :CKFILES
  84. FOR %%F IN (SDLPARMS.BAT SDLDEBUG.BAT SDLFINIS.BAT SDLNOTOG.BAT) DO IF NOT EXIST %%F GOTO FILES
  85. sdl_get D
  86. IF ERRORLEVEL 30 GOTO BEGIN
  87. IF NOT ERRORLEVEL 20 GOTO NOT1
  88. ECHO * * *
  89. set GET=SDLSETUP
  90. if "%1"=="SDLCONFG" SET GET=SDLCONFG
  91. ECHO DOS Versions prior to 3.1 are not specifically supported. If you have
  92. Echo any difficulty running %GET% under DOS 2.x, please see SDLSETUP.DOC.
  93. ECHO R >sdlsetup.txt
  94. ECHO * * *
  95. :BEGIN
  96. ECHO All checks completed, ready to proceed with SETUP.
  97. ECHO * * *
  98. set GET=SDLSETUP
  99. if "%1"=="SDLCONFG" SET GET=SDLCONFG
  100. ECHO If you do not want to continue with %GET% press Esc to exit...
  101. sdl_get C "Press C to continue, D to read the Documentation first(C,d): " CD}~
  102. IF ERRORLEVEL 126 GOTO QUIT
  103. IF ERRORLEVEL 125 GOTO CONTINUE
  104. IF ERRORLEVEL 67 IF NOT ERRORLEVEL 68 GOTO CONTINUE
  105. IF NOT EXIST SDLSETUP.DOC GOTO MENTION
  106. IF NOT EXIST SDL_SHOW.EXE MORE <SDLSETUP.DOC
  107. IF EXIST SDL_SHOW.EXE SDL_SHOW SDLSETUP.DOC
  108. set GET=SDLSETUP
  109. if "%1"=="SDLCONFG" SET GET=SDLCONFG
  110. ECHO Returning to %GET% ...
  111. ECHO * * *
  112. GOTO CONTINUE
  113. :MENTION
  114. echo SDLSETUP.DOC was not found and cannot be displayed now.
  115. ECHO You may copy or print SDLSETUP.DOC from the original MASDIR disk.
  116. Pause
  117. :CONTINUE
  118. sdl_get B
  119. ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  120. ECHO * * *                     INSTRUCTIONS                              * * *
  121. ECHO * * *             Please read before proceeding.                    * * *
  122. ECHO * * *                                                               * * *
  123. ECHO You may exit at any point by pressing Ctrl-C and answering Y to terminate.
  124. ECHO * * *
  125. ECHO You may skip to the next section at ANY PROMPT by pressing the Escape key
  126. ECHO (Esc on most keyboards).  Note that all selections are made by "pressing"
  127. ECHO single keys.  These selections are NOT "entered" by pressing the Enter
  128. ECHO key after making the selection.
  129. ECHO * * *
  130. ECHO The questions are set up with the original defaults capitalized.  If you
  131. ECHO select the capitalized choices the original defaults will be restored.
  132. ECHO If the choices are not alphabetic, the first one shown is the original
  133. ECHO default.  Either caps or lower case letters are OK for your selections.
  134. ECHO * * *
  135. ECHO If you do not want to change the operation of a selection, just press
  136. ECHO the Enter key (sometimes called Return or "<CR>").  This is indicated as
  137. ECHO choice (cr). Or press Esc to skip to the next section of questions.
  138. ECHO * * *
  139. PAUSE
  140. REM Reset the size in GET
  141. sdl_get F SDL.COM
  142. IF NOT "%1"=="SDLCONFG" SDLPARMS %$% %GET%
  143. IF "%1"=="SDLCONFG" SDLNOTOG %$% %GET%
  144. REM Normally the BATch file ends here, the rest are error messages.
  145. GOTO QUIT
  146. :NODEBUG
  147. ECHO * * *
  148. ECHO An error was encountered during the check of system resources.
  149. ECHO If the error message was "File creation error" and/or "File not found"
  150. ECHO it probably means the diskette is write protected.
  151. Echo * * *
  152. Echo If the error message was "Command or filename not recognized" or
  153. Echo 'Unknown command "debug"', or a similar message, it probably
  154. Echo means that your operating system is DR DOS.  Please see MASDIR54.NEW
  155. Echo for information on using the included DR DOS setup files, or contact
  156. Echo the author of MASDIR for a DR DOS compatible setup program.
  157. ECHO * * *
  158. ECHO If the message was "Bad command or file name" or similar, it means
  159. ECHO that the MS DOS system file DEBUG.COM is not available.
  160. ECHO This program must have access to the DOS external command file
  161. ECHO DEBUG.COM.  It must be in this directory on this disk or in
  162. ECHO one of the directories on your path, which is
  163. PATH
  164. set GET=SDLSETUP
  165. if "%1"=="SDLCONFG" SET GET=SDLCONFG
  166. ECHO Please correct the problem and run %GET% again.
  167. goto quit
  168. :FILES
  169. ECHO * * *
  170. ECHO The following files must be in this current directory on this disk:
  171. FOR %%F IN (SDL.COM SDL_GET.EXE SDLPARMS.BAT SDLNOTOG.BAT) DO ECHO %%F
  172. FOR %%F IN (SDLSETUP.BAT SDLFINIS.BAT SDLDEBUG.BAT) DO ECHO %%F
  173. IF "%$%"=="54 55" ECHO SDLTITLE.COM
  174. GOTO QUIT
  175. :NOT1
  176. ECHO * * *
  177. ECHO MASDIR requires DOS 2.0 or higher (3.x preferred).
  178. GOTO QUIT
  179. :VERSION
  180. ECHO * * *
  181. set GET=SDLSETUP
  182. if "%1"=="SDLCONFG" SET GET=SDLCONFG
  183. ECHO The version of SDL.COM on this disk is incompatible with this
  184. ECHO version of %GET%.  Please copy compatible versions from
  185. ECHO your original MASDIR disk and try again.
  186. GOTO QUIT
  187. :ENVIRON
  188. ECHO * * *
  189. ECHO There is insufficient DOS Environment space to run this program.
  190. ECHO You already have the following items set in the environment:
  191. ECHO * * *
  192. SET GET=
  193. SET
  194. ECHO * * *
  195. ECHO This program needs about 100 more bytes of space.  You can clear
  196. ECHO one or more of the items out of the environment by entering
  197. ECHO commands like
  198. ECHO SET var=
  199. ECHO Where var is the name of one of the objects shown between the
  200. ECHO lines of asterisks above.  Each name is followed by the = sign.
  201. ECHO When you enter the command do not put anything after the = sign,
  202. ECHO not even a space.  Just press the Enter key (cr) immediately after
  203. ECHO the = key.  Do not clear COMSPEC, PATH, or PROMPT.
  204. ECHO After you have cleared one or more names from the environment,
  205. ECHO run this program again.
  206. :QUIT
  207. pause
  208. REM SDLDEBUG will clean up any temporary files.
  209. sdldebug END
  210. :EXIT
  211. Echo Exiting to DOS